# 名称:Backdream
# 时间2022/12/28  21:39


from appium.webdriver.common.mobileby import MobileBy as By
from pages.base_page import BasePage


class ExercisePage(BasePage):
    # +号
    add_btn_locator = (By.XPATH,
                       "//android.widget.TabWidget[@resource-id=\"android:id/tabs\"]/android.widget.RelativeLayout[3]/android.widget.RelativeLayout[1]")

    # 晒作品
    pushworks_btn_locator = (By.XPATH, "//android.widget.TextView[@text=\"晒作品\"]")

    # 写食谱
    writefood_btn_locator = (By.XPATH, "//android.widget.TextView[@text=\"写食谱\"]")

    # 草稿箱
    drafts_btn_locator = (By.XPATH, "")

    # 下一步
    next_btn_locator = (By.XPATH, "//android.widget.TextView[@resource-id=\"com.gfeng.daydaycook:id/mTvNext\"]")

    # 选中图片
    chose_pic_locator = (By.XPATH,
                         "//android.support.v7.widget.RecyclerView[@resource-id=\"com.gfeng.daydaycook:id/mRecyclerView\"]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.widget.RelativeLayout[1]/android.widget.TextView[1]")

    # X关闭
    x_btn_locator=(By.XPATH,"//android.widget.ImageView[@resource-id=\"com.gfeng.daydaycook:id/colse_imageview\"]")

    # 发布
    send_btn_locator=(By.XPATH,"//android.widget.TextView[@resource-id=\"com.gfeng.daydaycook:id/publish_textview\"]")

    # 保留草稿
    save_drafts_locator=(By.XPATH,"//android.widget.TextView[@resource-id=\"com.gfeng.daydaycook:id/tv_draft_save\"]")

    # 食谱页面X关闭
    food_x_locator=(By.XPATH,"//android.widget.ImageView[@resource-id=\"com.gfeng.daydaycook:id/iv_close\"]")

    # 食谱页面菜名
    food_name_locator=(By.XPATH,"//android.widget.EditText[@resource-id=\"com.gfeng.daydaycook:id/et_recipe_name\"]")

    # 食谱内容
    food_text_locator=(By.XPATH,"//android.widget.EditText[@resource-id=\"com.gfeng.daydaycook:id/et_recipe_description\"]")

    # 食谱图片
    food_pic_locator=(By.XPATH,"//android.widget.LinearLayout[@resource-id=\"com.gfeng.daydaycook:id/ll_cover_text\"]")

    #